Ext.define('DCApp.view.attach.Detail', {
    extend: 'DCApp.view.Detail',
    alias: 'widget.attachdetail',
    bind: {
        title: '附件 - 【{theObj.id}】'
    },
    componentCls: 'attach-detail',
    controller: 'attachdetail',
    viewModel: {
        type: 'attachdetail'
    },
    
    tbar: ['->',{
        text: '保存',
        handler: 'onSaveClick'
    },{
        text: '返回',
        handler: 'onBackClick'
    }],
    
    items: [{
        id:'panel0',
    	listeners: {
		  render: function(p){
			p = p.getEl();
			var me= this.up();
			me.h0=p.getHeight();
		    p.on('scroll', function(e, t){
		    	//console.log(t.scrollTop +"   "+ t.clientHeight);
		    	me.onscroll(t.scrollTop,t.clientHeight);
		    }, p);
		  }
		},
    	title: 'Panel 0',
        flex: 2,
        frame: false,
        xtype: 'container',
        layout: 'anchor',
        style: {
            overflow: 'auto'
        },
        items: [
                {
                    title: '附件信息',
                    margin: '0 0 10 0',
                    cls:'nav_pos',
                    reference: 'form',
                    bodyPadding: 10,
                    fieldDefaults: {
                        labelAlign: 'right',
                        labelWidth: 100,
                        padding:3
                    },
                    defaults: {
                        anchor: '100%'
                    },
                    xtype: 'form',
                    items: [{},{
                        xtype: 'textfield',
                        fieldLabel: '题名',
                        allowBlank: false,
                        bind: '{theObj.name}',
                        publishes: ['value']
                    },{
                        xtype: 'filefield',
                        name: 'file1',
                        fieldLabel: '附件上传'
                    }]
                }
            ]
        }]
});
